import NewsIndexModel from '@/models/newsIndex';
import SlideShowModel from '@/models/slideShow';
import { HttpRequest } from 'xo-web-base';

export default class NewsService {
    /**
     * 列表
     * @param pageNumber
     * @param pageSize
     * @returns
     */
    static list(option) {
        return HttpRequest.post<NewsIndexModel>('/mini/news/list',
            option
        );
    }
    static list1(option) {
        return HttpRequest.post<NewsIndexModel>('/mini/news/list',
            option
        );
    }

    /**
     * 新闻详情
     * @param id
     * @returns
     */
    static info(id: any) {
        return HttpRequest.post<NewsIndexModel>('/mini/news/info', {
            id: id,
        });
    }

    /**
        * 轮播图列表
        * @param sequence 
        * @returns 
        */
    static slideShowList(option?: any) {
        return HttpRequest.post<SlideShowModel>('/mini/slide/list',
            option
        )
    }
}